<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
//条件分支语句(if,三元表达式,switch)相同
    let day = prompt("请输入今天星期几:");
    //alert(typeof(day));
    day = parseInt(day);    //使string转换到number
    //alert(typeof(day));
    switch(day)
    {
        case 1:
            alert("今天是星期一");
            break;
        case 2:
            alert("今天是星期二");
            break;
        case 3:
            alert("今天是星期三");
            break;
        case 4:
            alert("今天是星期四");
            break;
        case 5:
            alert("今天是星期五");
            break;
        case 6:
            alert("今天是星期六");
            break;
        case 7:
            alert("今天是星期天");
            break;
        default:
            alert("输入错误");
            break;
    }

//循环语句(while,for)（break,continue）
    











</script>
</html>